import httpRequest from '@/utils/request'

// 查询校区列表
export function listCampus(query) {
	return httpRequest.request({
		url: '/market/campus/list',
		method: 'post',
		data: query
	})
}

// 查询校区列表
export function campusVoList(query) {
	return httpRequest.request({
		url: '/market/campus/campusVoList',
		method: 'post',
		params: query
	})
}

// 查询校区详细
export function getCampus(id) {
	return httpRequest.request({
		url: '/market/campus/' + id,
		method: 'get'
	})
}

// 新增校区
export function addCampus(data) {
	return httpRequest.request({
		url: '/market/campus',
		method: 'post',
		data: data
	})
}

// 修改校区
export function updateCampus(data) {
	return httpRequest.request({
		url: '/market/campus',
		method: 'put',
		data: data
	})
}

// 删除校区
export function delCampus(id) {
	return httpRequest.request({
		url: '/market/campus/' + id,
		method: 'delete'
	})
}